package com.ruoyi.worker.service.impl;

import com.ruoyi.worker.domain.TermAttendanceRulesV2Domain;
import com.ruoyi.worker.mapper.TermAttendanceRulesV2Mapper;
import com.ruoyi.worker.service.TermAttendanceRulesV2Service;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TermAttendanceRulesV2ServiceImpl implements TermAttendanceRulesV2Service {

    @Resource
    private TermAttendanceRulesV2Mapper mapper;


    @Override
    @Transactional
    public void addOrUpdateRecord(List<TermAttendanceRulesV2Domain> domain) {
        domain.forEach(item -> {
            mapper.addOrUpdateRecord(item);
        });
    }

    @Override
    public List<TermAttendanceRulesV2Domain> ruleRecords() {
        return mapper.ruleRecords();
    }
}
